home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 20
/
Cream of the Crop 20 (Terry Blount) (1996).iso
/
windows
/
ll_110.zip
/
LOGLIST.DOC
< prev
next >
Wrap
Text File
|
1996-05-27
|
21KB
|
573 lines
TBBS Log-Lister
by Paul Blitz
Version 1.10
20 May 96
Introduction
============
Last year, I wrote some simple programs to list out certain (fixed) fields
from the userlog to a text file. Michael Muller suggested that a more
complete & more flexible program would be useful, especially so that the
output files could be used with TYPE 1 & 2 text listing commands. Another
sysop later pointed out that LogLister will also be suitable to produce
simple lists to use with type 20 Keyword Searches.
Log-Lister allows you to create your own customised lists from your TBBS
userlog file. These files list one user's details per line, and may include
colourisation commands (using "%Xnn%" sequences), fixed text, headings,
tabs, as well as the data itself.
The "definition" of the output is made in the configuration file: you can
have several of these, and simply call up the one you want to use on the
program's command line.
Log-Lister is a DOS program, and would typically be called as part of your
night-time external event, from the relevant batch file (that's YOUR
problem, not mine... <grin>)
This version of Log Lister has been written for use with TBBS 2.3.
New in version 1.10
===================
It suddenly occurred to me that, in this world of the Internet, I ought to
be supporting HTML somehow! The main thing that the program needed was the
ability to ignore <things inside HTML "codes">.... which is what I've done.
If you include the "X2" keyword, then anything within "<>" pairs is ignored
(as far as delting excessive text) when tabs are done, just like %Xnn%
sequences are ignored.
Future Versions
===============
I hope that there will be enough interest to make it worthwhile improving
the program further.... if you have any suggestions for improvements to
the program, then let me know (see the end for contact addresses)
When you register, your "registration key" will be valid for all future
"non-major" upgrades to the program.
Running the program
===================
LOGLIST.EXE and your TBBS userlog (USERLOG.BBS) do *not* need to be
together in the same directory, as long as you define a full path to your
userlog. Unless Borland have screwed up the pascal compiler, your userlog
is only ever opened for READING, so your userlog won't be disturbed in any
way.
The program calling syntax is:
LOGLIST <config file>
If you don't give a config file, then "LOGLIST.CFG", in the current
directory, will be used.
The filename may include a full pathname, upto a maximum length of 50
characters.
The config file not only contains formatting information, but gives the
paths & filenames for the USERLOG.BBS file, the output text file, and the
log file. This allows you to have multiple configuration files to produce
several output files.
The program will return one of several error levels when it exits:
0 : Program ran OK
1 : Error in command line parameters
2 : Can't find file
3 : Error in config file
9 : Control-C / Escape was pressed during program
99: Internal processing error (eg: out of range value)
All errors will also return an error message on the screen (and the log
file), with as much useful information as possible.
To help get you going, I've included some demo config files... if *you* do
any good configs, please send them to me, and I'll include them (and then
you could become famous!!)
How it works
============
The program simply creates a textual list file, which can either be
printed, or can be viewed online by your callers (eg with a TYPE1). The
file contains page headers, and one line of text for each user in your
userlog..... or rather for each user who matches the "restriction criteria"
(see below).
You can define a "page length": when you do this, the program will insert a
"%MORE%" at the relevant places. When viewed online, the user will then see
the data a page at a time.
The file can have a set of file- and page-header lines, and a set of
page-bottom lines: these are copied from the config file verbatim, so may
contain "real-time" substitution parameters which TBBS will expand for you.
The lines of user data are then built up from lines of different types of
data (eg words, substitution parameters and colourisation commands). If the
data contains substitution parameters, then they are replaced by the
relevant data from the userlog records.
For example, the set of data might include:
header "A list of names etc"
header "-------------------"
%X03%
%NAME%
Tab to column 20
%X95%
%PHONE%
Tab to column 35
%X22%
%ADDR1%
a ","
a space
%ADDR2%
a "."
(this is NOT actually how the data is defined... see below)
This would give a list something like this:
A list of names etc
-------------------
Paul Blitz %X95%441962885696 %X22%25 Woodgreen Road, Winchester.
Phil Becker %X95%303 699 6565 %X22%15200 E. Girard Ave., Aurora.
.... etc
The "file header" gets printed once, at the top of the file. The "page
headers" are printed at the top of the second and subsequent pages (after a
"%MORE%").
The way the data is created is defined by the config file (see below). If
you want to create several lists, then you simply create multiple
configuration files, and run LOGLIST multiple times, specifying the
different config files.
Config File format
==================
The config file format is, I hope, fairly straight-forward, and if best
understood by looking at the supplied demo config files.
Column 1 of the file defines what that line is:
U or u - path & filename of your USERLOG.BBS file
O or o - path & filename of the output file
L or l - path & filename of the log file
F or f - a file header line
P or p - a page header line
B or b - a page bottom line
R or r - restriction criteria
D or d - a data field
S or s - a space setting
T or t - a tab setting
M or m - lines after which to insert a "%MORE%"
X or x - special options
Anything else in column 1 will cause the rest of the line to be ignored:
this is a good way of adding comments. To cover future expansion, I'd
advise using a ";", as that will be reserved for comments in all future
versions for comment lines (anything else could get used for something!)
Column 2 onwards holds the data. The line of data is ended by a <cr>
(chr(13)). To make things predictable, all TRAILING spaces are removed (use
the "S" or "T" command to include spaces at the end of the data)
Apart from the headers and comments, you may have upto 200 "items". These
will display in the order they appear in the config file.
Userlog, Output and Log files:
------------------------------
These three line types define where your userlog, output, and error log
files are. If you are silly enough to duplicate either of these, then the
last one will be used. Each path/filename may be upto 50 characters long.
If the userlog file can not be found, the program will abort.
The output file will simply overwrite any existing file.
The log file will simply append to any existing file: at a minimum, the log
will list the date / time of the run, and the config files used. The log
file is not opened until the config file has been read (as that is where
the error log's name is defined), so errors in the config file which cause
a program abort will not be logged (if this becomes a big problem, let me
know, and I'll work out a way around it).
You would normally put these as the first three lines of your config file.
File Header lines:
------------------
You can have up to 10 file header lines, each limited to being 120
characters long. They are simply copied verbatim to the beginning of the
output file in the order they appear in the config file.
Whilst they need not be in a block at the top of the file, you'll probably
find it easier if they are!
You can include ANY substit